/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package raccoon.suvisa.datos.entities;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Laura
 */
@Entity
@Table(name = "PLAZO", catalog = "", schema = "IS963601")
@NamedQueries({@NamedQuery(name = "Plazo.findAll", query = "SELECT p FROM Plazo p"), @NamedQuery(name = "Plazo.findByIdPlazo", query = "SELECT p FROM Plazo p WHERE p.idPlazo = :idPlazo"), @NamedQuery(name = "Plazo.findByPlazo", query = "SELECT p FROM Plazo p WHERE p.plazo = :plazo")})
public class Plazo implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_PLAZO", nullable = false, precision = 22)
    private BigDecimal idPlazo;
    @Basic(optional = false)
    @Column(name = "PLAZO", nullable = false)
    private BigInteger plazo;

    public Plazo() {
    }

    public Plazo(BigDecimal idPlazo) {
        this.idPlazo = idPlazo;
    }

    public Plazo(BigDecimal idPlazo, BigInteger plazo) {
        this.idPlazo = idPlazo;
        this.plazo = plazo;
    }

    public BigDecimal getIdPlazo() {
        return idPlazo;
    }

    public void setIdPlazo(BigDecimal idPlazo) {
        this.idPlazo = idPlazo;
    }

    public BigInteger getPlazo() {
        return plazo;
    }

    public void setPlazo(BigInteger plazo) {
        this.plazo = plazo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idPlazo != null ? idPlazo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Plazo)) {
            return false;
        }
        Plazo other = (Plazo) object;
        if ((this.idPlazo == null && other.idPlazo != null) || (this.idPlazo != null && !this.idPlazo.equals(other.idPlazo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "raccoon.suvisa.datos.entities.Plazo[idPlazo=" + idPlazo + "]";
    }

}
